import React, { Component } from 'react'
import Test from './Test'
export default class App extends Component {
  state = {
    x: 1,
  }
  render() {
    return (
      <div>
        App
        <button
          onClick={() => {
            this.setState({ x: 0})
          }}
        >
          更新父组件
        </button>
        <hr />
        {this.state.x && <Test></Test>}
      </div>
    )
  }
}
